<?php

    include '../../../controlador/php/conexion/Conexion.php';

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of DaoTipoCaso
 *
 * @author maospina
 */
class DaoTipoCaso {
    //put your code here
    
    private $Oid;
    private $TcNombre;
    
    function __construct($Oid, $TcNombre) {
        $this->Oid = $Oid;
        $this->TcNombre = $TcNombre;
    }

    function getOid() {
        return $this->Oid;
    }
    
    function getTcNombre() {
        return $this->TcNombre;
    }

    function setOid($Oid) {
        $this->Oid = $Oid;
    }

    function setTcNombre($TcNombre) {
        $this->TcNombre = $TcNombre;
    }

    function ListaTiposCaso(){
        
        $con = new Conexion();
        
        $select = "select * from DnTipCaso_new";
        
        $res = $con->query($select);
        
        while($res2 = mssql_fetch_array($res)){
            
            $lista[] = array_map(utf8_encode, $res2);
            
        }
        
        print_r(json_encode($lista));
        
        $con->cerrarConexion();
        
    }
    
}
